These functions are used for internal communication between the base and format-specific graphics exporter. Applications will not usually need to call them.
Asks whether the current export operation should be performed by transcoding.
pascal ComponentResult GraphicsExportCanTranscode (
GraphicsExportComponent ci,
Boolean *canTranscode);
Graphics exporters may be able to transcode from some inputs and not from others. For instance, the JPEG graphics exporter is able to transcode compressed JPEG streams, but not other kinds of compressed data. Use this call to ask a graphics exporter whether it can transcode the current input with the current settings.
The base graphics exporter makes this call of the format-specific graphics exporter to ask whether the current export operation should be done by transcoding. If the format-specific exporter replies that it should, the base exporter will call GraphicsExportDoTranscode to do so.
If the format-specific exporter implements the GetDontRecompress call and that call returns false , the base exporter will not attempt transcoding.
Format-specific exporters may delegate this call; the base graphics exporter's implementation gives a reply of false .
Format-specific exporters implementing GraphicsExportCanTranscode should call GraphicsExportMayExporterReadInputData . If the answer is no, then the format-specific exporter will not be able to transcode.
Performs an export operation by transcoding.
pascal ComponentResult GraphicsExportDoTranscode (
GraphicsExportComponent ci);
The base graphics exporter makes this call of the format-specific graphics exporter to perform a transcoding export. This function should call GraphicsExportGetInputDataSize and GraphicsExportReadInputData to measure and read the input image data, and GraphicsExportWriteOutputData to write the output image file.
Asks whether to use a compressor.
pascal ComponentResult GraphicsExportCanUseCompressor (GraphicsExportComponent ci,
Boolean *canUseCompressor,
void *qtAtomContainerPtr);
The base graphics exporter makes this call of the format-specific graphics exporter to ask whether the current export operation should be done by using an image compressor. If the answer is true , the format-specific exporter must also create and return an atom container.
This atom container must contain an atom of type kQTSettingsVideo ( `vide' ). This atom must contain a child atom of type scSpatialSettingsType containing a SCSpatialSettings record specifying which compressor to use, the depth, and the spatial quality.
The `vide' atom may also contain several optional child atoms:
Format-specific exporters may delegate this call; the base graphics exporter's implementation gives a reply of false .
Performs a compressing export.
pascal ComponentResult GraphicsExportDoUseCompressor (GraphicsExportComponent ci,
void *qtAtomContainer,
ImageDescriptionHandle *outDesc);
The base graphics exporter makes this call to perform a compressing export.
Format-specific exporters will normally delegate this call, unless they implement export to a container format like PICT or QuickTime Image. In that case, they will wrap the base exporter's implementation in one that forms the container about the compressed data.
pascal ComponentResult GraphicsExportDoStandaloneExport ( GraphicsExportComponent ci);
If both CanTranscode and CanUseCompressor reply false , the base graphics exporter makes this call of the format-specific exporter to perform the call.
The format-specific exporter may call GraphicsExportGetInputImageDescription , GraphicsExportGetInputImageDimensions , and GraphicsExportGetInputImageDepth to find out about the input image. It should allocate a pixmap and call GraphicsExportDrawInputImage to draw portions of the input image into that pixmap.
It should call GraphicsExportWriteOutputData to write the image data.
| Previous | Chapter Contents | Chapter Top | Next |